package com.unpay.other;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;


public class MainActivity extends Activity {
    private TextView tv_send;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        tv_send = (TextView) findViewById(R.id.tv_send);
        final String type = getIntent().getStringExtra("type");
        tv_send.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent in = new Intent();
                in.setAction("com.umpay.launcher.action.launcher");
                in.setPackage("com.umpay.launcher");
                in.putExtra("type", type);// 根据type类型 launcher可区分消息来源
                in.putExtra("status", 0);// 0成功，
                in.putExtra("des", "登录成功");
                in.putExtra("data", "json");// Launcher需要的相关json数据
                ComponentName componentName = startService(in);
                Log.e("kk", "开启Launche服务:" + componentName.toString());

            }
        });
    }
    
    
}
